class @AdminAuthorRoutes extends Backbone.Router
    
    routes:
        "Authors/Create": "Create"
        "Authors/Edit*path": "Edit"
        "Authors/Listing*path": "Listing"
        "Authors/Index": "Listing"
        "Authors": "Listing"

    Create: ->
        model = new AdminAuthorCreateModel()
        view = new AdminAuthorCreateView({ model: model })
        view.render()

    Edit: ->
        model = new AdminAuthorEditModel()
        model.set("AuthorId", Url.GetParameterByName("AuthorId"))
        view = new AdminAuthorEditView({ model: model })

    Listing: ->
        model = new AdminAuthorListingModel()
        model.FillModelFromUrl()
        view = new AdminAuthorListingView({ model: model })
